import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    tableData:[]
  },
  getters: {
  },
  mutations: {
    //添加
    addobj(state,obj){
      state.tableData.push(obj)
    },
    // 删除
    delobj(state,index){
      state.tableData.splice(index,1)
    }
  },
  actions: {
  },
  modules: {
  }
})
